Skip to content

[GEN-1588] Avoid 0 sats/vb#529

Open
imclvr wants to merge 1 commit into
mainfrom
fix/0-sat-per-vb
Open

[GEN-1588] Avoid 0 sats/vb#529
imclvr wants to merge 1 commit into
mainfrom
fix/0-sat-per-vb

Conversation

@imclvr

@imclvr imclvr commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@imclvr imclvr requested review from Jossec101 and RodriFS July 2, 2026 07:03
Comment thread src/Helpers/Constants.cs Outdated
@imclvr imclvr force-pushed the fix/0-sat-per-vb branch from 85ed02b to e27de6e Compare July 3, 2026 10:54
if (recommendedFeeRate == null)
{
_logger.LogWarning("Error getting recommended fee rate for type {feeType}, using 0", mempoolFeesType);
feeRate = 0;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If mempool is down use 1 (?)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1, or 0.1? 🤔

1 => More money wasted, faster mining.
0.1 => Conservative, slower mining.

@RodriFS RodriFS Jul 6, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mm this kind of breaks this code inside GenerateTemplatePSBT

//We get the mempool.space recommended fees, the custom or use the bitcoin core (nbxplorer) one if not available
var feerate = await _nbXplorerService.GetFeesByType(walletWithdrawalRequest.MempoolRecommendedFeesType)
    ?? walletWithdrawalRequest.CustomFeeRate
    ?? (await LightningHelper.GetFeeRateResult(network, _nbXplorerService)).FeeRate
    .SatoshiPerByte;

if the mempool is not working, then we default to LightningHelper.GetFeeRateResult as a backup

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but @RodriFS , for what I saw, GetFeeRateResult relies on Mempool for non reg-test, so in this particular case (and rare) where mempool service is not up, it will call it again 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants